$(".dots a").mouseover(function(){
	$(".dots a").removeClass("active").eq($(this).index()).addClass("active");
	$(".index-swiper img").hide().eq($(this).index()).fadeIn("slow");
})



var app = angular.module("myapp", []);
app.controller("mycontroller", function($scope, $http) {
	
	$scope.getshopcar = function(){
		$http({
			url: "getshopcar",
			method: "POST",
			headers: {
				'Content-Type': 'application/x-www-form-urlencoded'
			}
		}).success(function(res) {
			$(".header-num").html(res.data.length);
		   	if(res.data.length>0){
		   		$(".header-cartshow-text").html("去购物车并结算");
		   		$scope.goodlist=res.goodinfo;
		   	}
		}).error(function(err) {
			console.log(err);
		})
	}
	$scope.getshopcar();
})


